﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CIRDiagnoseDevice
{
    public partial class RFPortTXLevel : Form
    {
        public RFPortTXLevel()
        {
            InitializeComponent();
            this.numericUpDown1.Increment = 0.11M;
            this.numericUpDown1.DecimalPlaces = 2;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            float settingValue;
            this.DialogResult = DialogResult.OK;
             float.TryParse(numericUpDown1.Value.ToString(), out settingValue);
             MainForm.RXSettingValue = settingValue;
             this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void RFPortTXLevel_Load(object sender, EventArgs e)
        {
            numericUpDown1.Value = (decimal)MainForm.RXSettingValue;
        }
    }
}
